
<div class="wrapper-sm">
    <div class="panel panel-default">
        <div class="row wrapper">
            <div class="col-sm-10 m-b-xs">
                <form class="form-inline" role="form">
                    <div class="form-group m-r-xs">
                        <input class="form-control input-sm" placeholder="bean名称" ng-model="params.beanName">
                    </div>
                    <button type="submit" class="btn btn-sm btn-default" ng-click="search()">搜索</button>


                </form>
            </div>

            <div class="col-sm-2">

                <button ui-sref="app.sys.job.form" class="btn btn-sm btn-primary"
                        ng-if="hasAuthority('sys:job:save')">新建
                </button>
                <button ui-sref="app.sys.joblog.list" class="btn btn-sm btn-info"
                        ng-if="hasAuthority('sys:joblog:list')">操作日志
                </button>
            </div>
        </div>

        <div class="table-responsive">
            <table class="table table-striped table-bordered table-condensed text-nowrap">
                <thead>
                <tr class="b-t b-light">
                    <th ui-order-column="a.beanName">spring bean名称</th>
                    <th ui-order-column="a.methodName">方法名</th>
                    <th ui-order-column="a.params">参数</th>
                    <th ui-order-column="a.cronExpression">cron表达式</th>
                    <th ui-order-column="a.status">任务状态</th>
                    <th ui-order-column="a.remark">备注</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in pageInfo.list">

                    <td>{{item.beanName}}</td>
                    <td>{{item.methodName}}</td>
                    <td>{{item.params}}</td>
                    <td>{{item.cronExpression}}</td>
                    <td class="text-center">
                        {{item.status | dict: 'STATUS' }}
                    </td>
                    <td>{{item.remark}}</td>

                    <td>
                        <button ui-sref="app.sys.job.form({id: item.id})" class="btn btn-info btn-sm">详情</button>


                        <button ng-click="pause(item.id)" class="btn btn-sm btn-info"
                                ng-if="hasAuthority('sys:job:pause')">暂停
                        </button>
                        <button ng-click="resume(item.id)" class="btn btn-sm btn-primary"
                                ng-if="hasAuthority('sys:job:resume')">恢复
                        </button>
                        <button ng-click="run(item.id)" class="btn btn-sm btn-success"
                                ng-if="hasAuthority('sys:job:run')">立即执行
                        </button>
                        <button ng-click="delete(item.id)" class="btn btn-danger btn-sm"
                                ng-if="hasAuthority('sys:job:delete')">删除
                        </button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>

        <!-- 底部分页 -->
        <span data-ng-include=" 'tpl/blocks/pagination.html' "></span>
    </div>
</div>

